{% extends 'base.html' %}

{% block body %}

<section>
  <form method='post' class='form-group' action='app/controllers/ResetPasswordController.php'>
    {{ App.Session.get('csrf')|csrf }}

    <p class='smallgray'>{{ App.Config.configArr.min_password_length }} {{ 'characters minimum'|trans }}</p>
    {# output the key and userid as hidden fields #}
    <input type='hidden' name='key' value='{{ key }}' />
    <input type='hidden' name='userid' value='{{ userid }}' />

    <div class='row'>
      <div class='col-md-4'></div>
      <div class='form-group col-md-4'>
        <label for='password'>{{ 'New password'|trans }}</label>
        <div class='input-group'>
          <input class='form-control' minlength='{{ App.Config.configArr.min_password_length }}' title='{{ 'Minimum password length: %d.'|trans|format(App.Config.configArr.min_password_length) }} {{ passwordInputHelp|e('html_attr') }}' id='password' name='password' type='password' pattern='{{ passwordInputPattern|e('html_attr') }}' autocomplete='new-password' required />
          <div class='input-group-append'>
            <button type='button' class='btn btn-light input-border' data-action='toggle-password' title='{{ 'Show password'|trans }}' aria-label='{{ 'Show password'|trans }}'><i class='fas fa-eye' aria-hidden='true'></i></button>
          </div>
        </div>
      </div>
      <div class='col-md-4'></div>
    </div>

    <div class='row'>
      <div class='col-md-4'></div>
      <div class='col-md-4 text-center'>
        <button class='btn btn-primary' type='submit' name='Submit'>{{ 'Save new password'|trans }}</button>
      </div>
      <div class='col-md-4'></div>
    </div>

  </form>
</section>
<div id='info' data-page='change-pass'></div>
{% endblock %}
